package com.lottery.repository;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lottery.entity.UserChance;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserChanceRepository extends BaseMapper<UserChance> {
    
    /**
     * 根据用户ID查找抽奖机会
     */
    @Select("SELECT * FROM user_chances WHERE user_id = #{userId}")
    UserChance findByUserId(Long userId);
}